import Vue from 'vue'
import { stringify } from 'querystring'

Vue.prototype.$Navigation = {
  to(to) {
    let href = to.path
    if (to.query) href += '?' + stringify(to.query)
    location.href = href
  },
}
